<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes x{
            0%{
                width: 0px;
            }
            100%{
                width: 200px;
            }
        }
        div{
            width: 0;
            height: 30px;
            background-color: skyblue;
            border-radius: 15px;
            /* steps分几步完成动画 */
            animation: x 4s steps(5) forwards ;
            /* transform: ; */
            
            /* 过渡动画 */
            transition: all 0.2s;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>